﻿using Cofe.Core.Dynamic;
using Cofe.Core.Implements;
using Cofe.Core.Property;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Cofe.Core.Entry
{
    public class EntryLink : CofeSystemInfo, IEntryLink
    {

        #region Constructor

        public EntryLink(IPropertyHost properties, IDynamicPropertyInterfaceProvider[] providers)
            : base(properties, providers)
        {
        }

        public EntryLink(IPropertyHost properties)
            : base(properties)
        {

        }

        protected EntryLink()
            : base()
        {

        }

        #endregion

        #region Methods

        public void DeleteLink()
        {
            Properties.Behaviors.Invoke(CofeEntryLinkProperties.DeleteLink);
        }


        #endregion

        #region Data        

        #endregion

        #region Public Properties

        public ICofeSystemInfo Entry
        {
            get { return 
                CofeServices.EntryConstructor.ConstructEntry(                    
                        Properties.Property<IPropertyHost>(CofeEntryLinkProperties.LinkedEntryPH)); }
        }        

        #endregion


    }
}
